import com.yomahub.liteflow.script.ScriptExecuteWrap;
import com.yomahub.liteflow.script.body.JaninoCommonScriptBody;
import com.yomahub.liteflow.slot.DefaultContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ScriptS1 implements JaninoCommonScriptBody {

    @Override
    public Void body(ScriptExecuteWrap wrap) {
        Logger logger = LoggerFactory.getLogger("s1 script");

        int v1 = 2;
        int v2 = 5;
        int result = v1 * v2;
        logger.info("{} * {} = {}", v1, v2, result);

        DefaultContext ctx = (DefaultContext) wrap.cmp.getFirstContextBean();
        ctx.setData("s1", result);

        return null;
    }

}
